// class Employee {
//   constructor(name, age, position, permission) {
//     this.name = name
//     this.age = age
//     this.position = position
//     this.permission = permission
//   }
// }
//
// function createEmployee(name, age, position) {
//   let permission = []
//   switch (position) {
//     case 'PM':
//       permission = ['read', 'write', 'update']
//       break;
//     case 'CODER':
//       permission = ['read', 'write',]
//       break;
//     case 'CTO':
//       permission = ['read', 'write', 'update', 'delete']
//       break;
//     default:
//       permission = ['read']
//   }
//   return  new Employee(name, age, position, permission)
// }
//
// const pm = createEmployee('joly',23,'PM')
//
// const coder = createEmployee('curry',31,'CODER')
//
// console.log(pm,coder)


